package priv.pront.code.mati.province.comp;

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

/**
 * @Description:
 * @Author: pront
 * @Time:2023-11-18 16:24
 */
public class Main13 {

    static int n;
    static Set<Character> set = new HashSet<>();
    static char[][] g;
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        n = scanner.nextInt();
        g = new char[n][n];
        for (int i = 0; i < n; i++) {
           g[i] =scanner.next().toCharArray();
        }
        int i = 0, j  = 0;
        while (i < n && j < n) {
            if (!set.contains(g[i][j])) {
                set.add(g[i][j]);
            }else{
                break;
            }
            i++;
            j++;
        }
        if(i >= n && j >= n){
            System.out.println("accept");
        }else{
            System.out.println("refuse");
        }

    }
}
